home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
mac
/
allfiles
/
Itch
/
itch.dir
/
00004_Script_Button Parent
< prev
next >
Wrap
Text File
|
1999-03-08
|
1KB
|
45 lines
property sp,cst,rct,state
on New me,aSp
set the sp of me = aSp
set the cst of me = the name of member(the member of sprite the sp of me)
set temp = item 1 of the cst of me
SwapCast me,temp &",norm"
set the rct of me = the rect of sprite the sp of me
set the state of me = #default
return(me)
end
on CheckState me
case(the state of me) of
#default: CheckOver me
#normal: DoNormal me
#over: DoOver me
end case
end
on CheckOver me
if inside(the mouseLoc, the rct of me) then
set temp = item 1 of the cst of me
SwapCast me,temp &",over"
set the state of me = #over
end if
end
on DoNormal me
set temp = item 1 of the cst of me
SwapCast me,temp &",norm"
set the state of me = #default
end
on DoOver me
if inside(the mouseLoc, the rct of me) then
else
set the state of me = #normal
end if
end
on SwapCast me,aMem
set the cst of me = aMem
set the member of sprite the sp of me = the cst of me
end